import api from '../config.js'//基本配置
import {getUuid} from '../getUUID.js'
import CryptoJS from 'crypto-js'
import {getRandNum} from '../random.js'

/**上传文件*/
export function upLoadData(userId,url,fileName) {
	
		let userIds=userId?userId:getRandNum()
				return uni.uploadFile({
					url: 'https://ys-web.btzx.com.cn/upload/uploadStream', 
					filePath: url,
					name: 'file',
					header:{
						'Content-Type':'application/x-www-form-urlencoded'
					},
					formData: {
						companyId:api.companyId,
						appCode:api.appCode,
						userId:userIds,
						fileName:fileName
					},
				//complete: ()=> {}
				});
				}
				/**中断上传**/
				
				export function stopUpLoadData(event,userId) {
						//console.log(e)
						
								//
								uploadTask=upLoadData()
								return uploadTask.abort();
	
}
